﻿package {	import flash.display.MovieClip;		import com.mixmedia.utils.MovieClipTools;	import com.mixmedia.utils.StringUtils;	import com.mixmedia.utils.SystemUtils;	import com.mixmedia.view.NavButton;		/**	 * @author Colin */
final public class NavBtn extends MovieClip implements IButtonClip{
	public static var FILEPREFIX:String = 'FILEPREFIX';	private var base:NavButton;

	public function NavBtn(){		var n:String = name;		n = StringUtils.replace(name, FILEPREFIX, SystemUtils.getMovieFileName(this, false));
		var para:Array = n.split("$");
		base = new NavButton(MovieClipTools.findButton(this),para[1],para[2]);
	}

	public function addElement(element : IButtonElement) : void {
		base.addElement(element);
	}
	public function getElements():Array{		return base.getElements();	}
	public function select() : void {
		base.select();
	}	public function when(eventType : String, whichObject : Object, callFunction : Function) : void {	    addEventListener(eventType, callFunction, false, 0, true);	}	public function setMouseOverDelay(num : Number) : void {		base.setMouseOverDelay(num);	}		public function setMouseOutDelay(num : Number) : void {		base.setMouseOutDelay(num);	}		public function clearMouseOver() : void {		base.clearMouseOver();	}		public function clearMouseOut() : void {		base.clearMouseOut();	}
}}
